# include <stdio.h>
int main(){
	int a,n,s;
	scanf("%d %d",&a,&n);
	s=0;
	for(int i=1;i<=n;i++){
		int sum=sum*10+a;
		s=s+sum;
	}
	printf("%d",s);
	return 0;
}